package cn.gjxblog.aop.autoproxy.demo3;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl {

    @Autowired
    BeanFactory beanFactory;

    public Object getUser(Integer id){
        System.out.println("查询用户"+id);
        System.out.println(this.getClass());
        System.out.println(beanFactory.getBean("userServiceImpl").getClass());
        return "小红";
    }
}
